From cd49887acf4f7331bc16d6e5c5d3cd7ad86ab483 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Wed, 14 Mar 2007 09:36:14 -0600 Subject: [PATCH] [IA64] Fix get_page_type() and put_page_type() type_info is unsigned long = u64 Signed-off-by: Isaku Yamahata --- xen/arch/ia64/xen/mm.c | 6 +++--- xen/include/asm-ia64/mm.h | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/xen/arch/ia64/xen/mm.c b/xen/arch/ia64/xen/mm.c index 03a71a7f9e..f40b58c9f2 100644 --- a/xen/arch/ia64/xen/mm.c +++ b/xen/arch/ia64/xen/mm.c @@ -1933,7 +1933,7 @@ void pgtable_quicklist_free(void *pgtable_entry) void put_page_type(struct page_info *page) { - u32 nx, x, y = page->u.inuse.type_info; + u64 nx, x, y = page->u.inuse.type_info; again: do { @@ -1981,7 +1981,7 @@ void put_page_type(struct page_info *page) int get_page_type(struct page_info *page, u32 type) { - u32 nx, x, y = page->u.inuse.type_info; + u64 nx, x, y = page->u.inuse.type_info; ASSERT(!(type & ~PGT_type_mask)); @@ -2027,7 +2027,7 @@ int get_page_type(struct page_info *page, u32 type) { if ( ((x & PGT_type_mask) != PGT_l2_page_table) || (type != PGT_l1_page_table) ) - MEM_LOG("Bad type (saw %08x != exp %08x) " + MEM_LOG("Bad type (saw %08lx != exp %08x) " "for mfn %016lx (pfn %016lx)", x, type, page_to_mfn(page), get_gpfn_from_mfn(page_to_mfn(page))); diff --git a/xen/include/asm-ia64/mm.h b/xen/include/asm-ia64/mm.h index 799049eb22..166c22b1fe 100644 --- a/xen/include/asm-ia64/mm.h +++ b/xen/include/asm-ia64/mm.h @@ -87,33 +87,33 @@ struct page_info * IA-64 should make it a definition same as x86_64. */ /* The following page types are MUTUALLY EXCLUSIVE. */ -#define PGT_none (0<<29) /* no special uses of this page */ -#define PGT_l1_page_table (1<<29) /* using this page as an L1 page table? */ -#define PGT_l2_page_table (2<<29) /* using this page as an L2 page table? */ -#define PGT_l3_page_table (3<<29) /* using this page as an L3 page table? */ -#define PGT_l4_page_table (4<<29) /* using this page as an L4 page table? */ +#define PGT_none (0UL<<29) /* no special uses of this page */ +#define PGT_l1_page_table (1UL<<29) /* using this page as an L1 page table? */ +#define PGT_l2_page_table (2UL<<29) /* using this page as an L2 page table? */ +#define PGT_l3_page_table (3UL<<29) /* using this page as an L3 page table? */ +#define PGT_l4_page_table (4UL<<29) /* using this page as an L4 page table? */ /* Value 5 reserved. See asm-x86/mm.h */ /* Value 6 reserved. See asm-x86/mm.h */ -#define PGT_writable_page (7<<29) /* has writable mappings of this page? */ -#define PGT_type_mask (7<<29) /* Bits 29-31. */ +#define PGT_writable_page (7UL<<29) /* has writable mappings of this page? */ +#define PGT_type_mask (7UL<<29) /* Bits 29-31. */ /* Has this page been validated for use as its current type? */ #define _PGT_validated 28 -#define PGT_validated (1<<_PGT_validated) +#define PGT_validated (1UL<<_PGT_validated) /* Owning guest has pinned this page to its current type? */ #define _PGT_pinned 27 -#define PGT_pinned (1U<<_PGT_pinned) +#define PGT_pinned (1UL<<_PGT_pinned) /* 16-bit count of uses of this frame as its current type. */ -#define PGT_count_mask ((1U<<16)-1) +#define PGT_count_mask ((1UL<<16)-1) /* Cleared when the owning guest 'frees' this page. */ #define _PGC_allocated 31 -#define PGC_allocated (1U<<_PGC_allocated) +#define PGC_allocated (1UL<<_PGC_allocated) /* Bit 30 reserved. See asm-x86/mm.h */ /* Bit 29 reserved. See asm-x86/mm.h */ /* 29-bit count of references to this frame. */ -#define PGC_count_mask ((1U<<29)-1) +#define PGC_count_mask ((1UL<<29)-1) #define IS_XEN_HEAP_FRAME(_pfn) ((page_to_maddr(_pfn) < xenheap_phys_end) \ && (page_to_maddr(_pfn) >= xen_pstart)) -- 2.30.2